<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue'
import TheWelcome from './components/TheWelcome.vue'
import { test, DemoFixedLayout, Demo } from './react_app/index.ts';
import { applyPureReactInVue, applyReactInVue } from 'veaury'
import {provide, inject, h} from 'vue'
const TestReactApp = applyPureReactInVue(DemoFixedLayout)
const DemoReact = applyPureReactInVue(Demo)
function test2() {
  console.log('test', test);
  console.log('DemoFixedLayout', DemoFixedLayout);
}
provide('bossName', 'MSG form provide')


</script>

<template>
  <main>
    <div @click="test2">
      this is the main content area of Vue.js 3 app
    </div>
    <TestReactApp></TestReactApp>

    <DemoReact>
      <template #default>
        <div>
          默认插槽内容
        </div>
      </template>
      <template #slot1>
        具名 slot1
      </template>
      <template #slot2="bar">
        <div>
          具名 slot2 从React组件传递的内容: {{bar}}
        </div>
      </template>
      <template #slot3>
        <div>
          <HelloWorld/>
        </div>
      </template>
    </DemoReact>
  </main>
</template>

<style scoped>
header {
  line-height: 1.5;
}

.wrapper {
  max-width: 1200px;
  height: 600px !important;
}

.logo {
  display: block;
  margin: 0 auto 2rem;
}

@media (min-width: 1024px) {
  header {
    display: flex;
    place-items: center;
    padding-right: calc(var(--section-gap) / 2);
  }

  .logo {
    margin: 0 2rem 0 0;
  }

  header .wrapper {
    display: flex;
    place-items: flex-start;
    flex-wrap: wrap;
  }
}
</style>
